#include "taskthumbnailrequest.h"

namespace Wishmaster {

TaskThumbnailRequest::TaskThumbnailRequest(const PostId& postId, int attachmentIndex, const Wishmaster2::Network::Url& link, const QString& msg,
		Wishmaster2::Network::RequestManager* connector)
	: TaskRequest(rtPost, link, msg, connector),
	m_postid(postId),
	m_attachmentIndex(attachmentIndex)
{
}

PostId TaskThumbnailRequest::postId() const
{
	return m_postid;
}

int TaskThumbnailRequest::attachmentIndex() const
{
	return m_attachmentIndex;
}

void TaskThumbnailRequest::onRequestDone()
{
	QByteArray arr(request()->content()->data(), request()->content()->size());
	emit result(this, arr);
}

} // namespace Wishmaster
